<html>
<head><meta charset="utf-8"><title>placeholder loans vs placeholder subsets · t-compiler/wg-polonius · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/index.html">t-compiler/wg-polonius</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/placeholder.20loans.20vs.20placeholder.20subsets.html">placeholder loans vs placeholder subsets</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="189847207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/placeholder%20loans%20vs%20placeholder%20subsets/near/189847207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/placeholder.20loans.20vs.20placeholder.20subsets.html#189847207">(Mar 05 2020 at 23:09)</a>:</h4>
<p>does anyone remember if we explained somewhere why we felt placeholder loans were the way to go for subset errors, rather than say solution number 2 (tracking subsets of placeholder origins) which seems NLL-like (and solution 1 required the full subset TC which was not always applicable) ? was it because it felt like a natural representation ?</p>



<a name="189847246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/placeholder%20loans%20vs%20placeholder%20subsets/near/189847246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/placeholder.20loans.20vs.20placeholder.20subsets.html#189847246">(Mar 05 2020 at 23:09)</a>:</h4>
<p>they don't work as-is in the optimized variant while I feel we expected they would (but I haven't investigated why tbh, they may be adapted to do so) while I've prototyped the other solution there and it seems to work in our limited tests (but I haven't tried in rustc's tests)</p>



<a name="189847348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/placeholder%20loans%20vs%20placeholder%20subsets/near/189847348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/placeholder.20loans.20vs.20placeholder.20subsets.html#189847348">(Mar 05 2020 at 23:10)</a>:</h4>
<p>(and have also prototyped a location-insensitive variant like I mentioned yesterday, same similar ok-ish behaviour which needs full testing)</p>



<a name="189847388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/placeholder%20loans%20vs%20placeholder%20subsets/near/189847388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/placeholder.20loans.20vs.20placeholder.20subsets.html#189847388">(Mar 05 2020 at 23:11)</a>:</h4>
<p>so before spending more time in that direction, I was wondering whether those 2 solutions maybe had obvious flaws/strengths which made us choose one over the other ?</p>



<a name="189847544"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/placeholder%20loans%20vs%20placeholder%20subsets/near/189847544" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/placeholder.20loans.20vs.20placeholder.20subsets.html#189847544">(Mar 05 2020 at 23:13)</a>:</h4>
<p>that's the question I mentioned yesterday <span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span aria-label="point up" class="emoji emoji-1f446" role="img" title="point up">:point_up:</span> :) (nothing urgent)</p>



<a name="190533799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/placeholder%20loans%20vs%20placeholder%20subsets/near/190533799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/placeholder.20loans.20vs.20placeholder.20subsets.html#190533799">(Mar 13 2020 at 17:45)</a>:</h4>
<p>(note: I went with it anyway, and have reimplemented subset errors, in the LocationInsensitive/Hybrid and DatafrogOpt variants, and prototyped for fun the same kind of filtering to avoid tracking origins which can't cause subset errors, etc -- "for fun" because it can't exactly be applied to the other thing I was working on which was block-based transport)</p>



<a name="190914381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/placeholder%20loans%20vs%20placeholder%20subsets/near/190914381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/placeholder.20loans.20vs.20placeholder.20subsets.html#190914381">(Mar 17 2020 at 21:40)</a>:</h4>
<p>I think I leaned towards placeholder loans, <span class="user-mention" data-user-id="116113">@lqd</span>, because I wanted origins to be "equivalent" to some set of loans. This makes the connection to a type system like oxide more apparent. But I do remember that indeed the formulation of rules that tracked relations between origins was somewhat simpler.</p>



<a name="190915326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/placeholder%20loans%20vs%20placeholder%20subsets/near/190915326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/placeholder.20loans.20vs.20placeholder.20subsets.html#190915326">(Mar 17 2020 at 21:50)</a>:</h4>
<p>it also avoids the problem of things that exist everywhere in the cfg <em>and</em> are propagated through it (even though it doesn't really come up in the rules but as duplicate derived facts which are then de-duped)</p>



<a name="190915682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/placeholder%20loans%20vs%20placeholder%20subsets/near/190915682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/placeholder.20loans.20vs.20placeholder.20subsets.html#190915682">(Mar 17 2020 at 21:53)</a>:</h4>
<p>that being said, I was working on the OOMs caused by the Locations::All "hack which is not a hack", and for that I was thinking about representing these facts in a <code>outlives_everywhere</code> relation, and modify the <code>subset</code> and <code>requires</code> ("contains") rules to take those new facts into account in their TC</p>



<a name="190916043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/placeholder%20loans%20vs%20placeholder%20subsets/near/190916043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/placeholder.20loans.20vs.20placeholder.20subsets.html#190916043">(Mar 17 2020 at 21:56)</a>:</h4>
<p>(to avoid materializing the exact same facts as <code>outlives</code> tuples over the whole cfg; this would only materialize where origins/loans would need to flow into another origin)</p>



<a name="190916240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/placeholder%20loans%20vs%20placeholder%20subsets/near/190916240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/placeholder.20loans.20vs.20placeholder.20subsets.html#190916240">(Mar 17 2020 at 21:58)</a>:</h4>
<p>that <em>should</em> work but rn it'll just move the OOMs from rustc fact gen to polonius move errors on these big tests</p>



<a name="190916490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/placeholder%20loans%20vs%20placeholder%20subsets/near/190916490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/placeholder.20loans.20vs.20placeholder.20subsets.html#190916490">(Mar 17 2020 at 22:00)</a>:</h4>
<p>(which is more of a datafrog problem than a problem of move errors per se -- it's not made for gen-kill/bitvector problems rn)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>